<table cellpadding="5">
	<#if clientInfo??>
	<input id="sendUdid" name="udid" type="hidden" value="${(clientInfo.udid)!}" />
	<tr>
		<td>
			是否等待响应:
		</td>
		<td>
			<@eu.comboBox id="isWaitReturn" url="common.do?loadComboBox&key=YON&value=false" required="true" name="isWaitReturn"/>
		</td>
	</tr>
	<tr>
		<td class="tbLabel">发送内容:</td>
		<td>
			<textarea id="sendData" style="height: 150px;width:600px" rows="6"  name="data" class="easyui-validatebox" data-options="required: true"></textarea>
		</td>
	</tr>
	<tr>
		<td>
			
		</td>
		<td>
			<@eu.linkbutton showName="发送" iconCls="icon-send" onclick="sendDataControl()"/>
			<@eu.linkbutton showName="清除发送内容" iconCls="icon-clear" onclick="clearSendData()"/>
			<@eu.linkbutton showName="清除响应内容" iconCls="icon-clear" onclick="clearReturnData()"/>
		</td>
	</tr>
	<tr>
		<td class="tbLabel">响应内容:</td>
		<td>
			<textarea id="returnData" style="height: 150px;width:600px" rows="6"  name="returnData" class="easyui-validatebox" ></textarea>
		</td>
	</tr>
	<#else>
	<tr>
		<td class="tbLabel" style="color:red;">客户端已断开</td>
	</tr>
	</#if>
</table>
<script type="text/javascript">
	function clearSendData() {
		$('#sendData').html('');
	}
	function clearReturnData() {
		$('#returnData').html('');
	}
	function sendDataControl() {
		var data = {
				udid:$('#sendUdid').val(),
				isWaitReturn:$('#isWaitReturn').combobox('getValue'),
				data:$('#sendData').val()
			};
			printLog(data);
			onLoadingHandler(function() {
				$.post('rtcs.do?sendInfo',data,function(result){
		            printLog(result.msg);
		            $('#returnData').append("\r\n"+result.msg);
		            removeload();
		        },'json');
			});
	}
</script>
